#pragma once
#include "ParticleManager.h"
#include "../stdafx.h"
class CParticle;
class CFlyweight;
class CEmitter
{

private:


	void LoadXML();
public:
	enum EmitType { STEADY, BURST };
	CEmitter(void);
	CEmitter(CParticle* prmParticle, bool prmLoop, SGD::Point prmPos, SGD::HTexture m_htexImage);

	CEmitter(const CEmitter& cpy);

	~CEmitter();

	void SetupParticle(unsigned int prmEmitType, int prmLoop,const char * prmFilePath);
	void Update(float _elapsedTime);
	void Render();


	//Data members, TODO: properly make private.
	//SGD::Point m_oSteering;

	float m_iBurstLifetime;							//"Burst Emitter" lifetime.
	int m_iNumPart;
	std::vector<CParticle*> v_particles;
	std::vector<CParticle*> v_LivingPar;
	std::vector<CParticle*> v_DeadPar;
	int isLooping;								//will first be used to tell if we are suposed to loop, then will be overwritten to aid in looping logic.
	SGD::Point m_poiPos;
	SGD::Point * m_OwnerPoint;
	SGD::HTexture m_htexImage;
	CFlyweight * m_flyData;
	const char * m_sFilePath;
	int  m_MinLife, m_MaxLife;					//"Steady Emiter" lifetimes.
	int m_SpawnRate;
	bool m_bActive;
	float m_fScale;
};

